package com.zhongyu.pojo;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@TableName(autoResultMap = true)
@Data
public class Order {

	private Integer id;

	/**
	 * 生成日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime createTime;

	/**
	 * 审核日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime checkTime;

	/**
	 * 采购日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime purchaseTime;

	/**
	 * 入库或出库日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime stockTime;

	/**
	 * 1:采购 2：销售
	 */
	private Integer type;

	/**
	 * 下单员
	 */
	private Integer creator;
	private  String  creatorName;

	/**
	 * 审核员
	 */
	private Integer checker;
	private  String  checkerName;

	/**
	 * 采购员
	 */
	private Integer purchaser;
	private  String  purchaserName;
	/**
	 * 库管员
	 */
	private Integer stockKeeper;
	private String stockKeeperName;
	/**
	 * 供应商或客户ID
	 */
	private Integer providerId;
	private String providerIdName;
	/**
	 * 合计金额
	 */
	private Double totalMoney;

	/**
	 * 采购: 0:未审核 1:已审核, 2:已确认, 3:已入库；销售：0:未出库 1:已出库
	 */
	private String state;

	/**
	 * 驳回原因
	 */
	private String wayBillCode;

	/**
	 * 采购：4:审核驳回 5:确认驳回 6:入库驳回 销售:5出库驳回
	 */
	private String stat;

	@TableField(exist = false)
	private User user;

	@TableField(exist = false)
	private  Provider provider;
	@TableField(exist = false)
	private  Kehu kehu;

	@TableField(exist = false)
	private List<OrderDetail> orderDetail=new ArrayList<OrderDetail>();
	//private  OrderDetail orderDetail;

}
